//
//  UserInfoTableViewController.m
//  OrderMeal
//
//  Created by 江苏宏创 on 14-7-22.
//  Copyright (c) 2014年 qkong. All rights reserved.
//

#import "UserInfoTableViewController.h"
#import "defineFile.h"
@interface UserInfoTableViewController ()

@end

@implementation UserInfoTableViewController


- (void)viewDidLoad
{
    [super viewDidLoad];
    [self initView];
    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
    
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}


-(void)initView{
    self.nameLabel.text = [userDefaults objectForKey:@"lastName"];
    
    //性别1/2 男/女
    if ([[userDefaults objectForKey:@"sex"] isEqualToNumber:@1]) {
        self.sexLabel.text = @"男";
    }else{
        self.sexLabel.text = @"女";
    }
    
    self.emailLabel.text = [userDefaults objectForKey:@"email"];
    self.phoneLabel.text = [userDefaults objectForKey:@"phone"];
    self.buildingLabel.text = [userDefaults objectForKey:@"building"];
    self.houseLabel.text = [userDefaults objectForKey:@"address"];
}


- (IBAction)pointQuery:(id)sender {
    [self performSegueWithIdentifier:@"积分查询" sender:nil];
}


- (IBAction)myOrder:(id)sender {
    [self performSegueWithIdentifier:@"我的订单" sender:nil];
}



- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
